import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function queryPage(params?: object) {
  return http.request<HttpResult>("get", "/esflow/comment/getpage", {
    params: params
  });
}

export function queryList(params: object) {
  return http.request<HttpResult>("get", "/esflow/comment/getlist", {
    params: params
  });
}

export function addObj(params?: object) {
  return http.request<HttpResult>("post", "/esflow/comment/insert", {
    data: params
  });
}

export function getObj(id?: string) {
  return http.request<HttpResult>("get", `/esflow/comment/get/${id}`);
}

export function delObjs(id?: string) {
  return http.request<HttpResult>("post", `/esflow/comment/get/${id}`);
}

export function updateObj(params?: object) {
  return http.request<HttpResult>("post", "/esflow/comment/update", {
    data: params
  });
}
